/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package pvt.delez.pam.impl;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.common.util.Enumerator;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;

import pvt.delez.pam.PamPackage;
import pvt.delez.pam.VariableLibrary;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Variable Library</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * </p>
 * <ul>
 *   <li>{@link pvt.delez.pam.impl.VariableLibraryImpl#getExtensionPath <em>Extension Path</em>}</li>
 * </ul>
 *
 * @generated
 */
public class VariableLibraryImpl extends LibraryImpl implements VariableLibrary {
	/**
	 * The default value of the '{@link #getExtensionPath() <em>Extension Path</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getExtensionPath()
	 * @generated
	 * @ordered
	 */
	protected static final String EXTENSION_PATH_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getExtensionPath() <em>Extension Path</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getExtensionPath()
	 * @generated
	 * @ordered
	 */
	protected String extensionPath = EXTENSION_PATH_EDEFAULT;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected VariableLibraryImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return PamPackage.Literals.VARIABLE_LIBRARY;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getExtensionPath() {
		return extensionPath;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setExtensionPath(String newExtensionPath) {
		String oldExtensionPath = extensionPath;
		extensionPath = newExtensionPath;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, PamPackage.VARIABLE_LIBRARY__EXTENSION_PATH, oldExtensionPath, extensionPath));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case PamPackage.VARIABLE_LIBRARY__EXTENSION_PATH:
				return getExtensionPath();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case PamPackage.VARIABLE_LIBRARY__EXTENSION_PATH:
				setExtensionPath((String)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case PamPackage.VARIABLE_LIBRARY__EXTENSION_PATH:
				setExtensionPath(EXTENSION_PATH_EDEFAULT);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case PamPackage.VARIABLE_LIBRARY__EXTENSION_PATH:
				return EXTENSION_PATH_EDEFAULT == null ? extensionPath != null : !EXTENSION_PATH_EDEFAULT.equals(extensionPath);
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (ExtensionPath: ");
		result.append(extensionPath);
		result.append(')');
		return result.toString();
	}

} //VariableLibraryImpl
